package com.fqgj.sentry.common.request;

import com.fqgj.sentry.common.exception.BizException;
import com.fqgj.sentry.common.exception.enums.ErrorCodeEnums;

/**
 * Created by ykpbean kangping.ying@yuntu-inc.com
 *
 * @description
 * @create 2017-07-21 下午4:43
 */


public class PageVo extends ParamsObject {
    private Integer pageNum;
    private Integer pageSize;

    @Override
    public void validate() {
        if (pageNum==null || pageSize==null){
            throw new BizException(ErrorCodeEnums.param_valid_error);
        }
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public PageVo setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
        return this;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public PageVo setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
        return this;
    }
}
